<template>
  <view class="page">
    <Navbar title="系统公告" occupy scroll-top="40">
      <u-icon slot="left" name="arrow-left" color="#fff" :color="scrollTop >= 40 ? '#222' : '#fff'"  />
    </Navbar>
    <Sub-title
      :label="detail.title || '-'"
      color="#fff"
      size="28rpx"
      :bold="false"
      padding="30rpx 0 10rpx 0"
    />
    <Sub-title
      :label="detail.createTime || '-'"
      color="#bababa"
      size="24rpx"
      :bold="false"
      border
      padding="10rpx 0 30rpx 0"
    />
    <view class="content">
      {{ detail.details || "" }}
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      detail: {}, // 公告详情
      scrollTop: 0, // 距离顶部距离
    };
  },
  onLoad(e) {
    this.detail = JSON.parse(e.data);
  },
  onPageScroll(scroll) {
    this.scrollTop = parseInt(scroll.scrollTop);
    uni.$emit("onPageScroll", scroll.scrollTop);
  },
  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.page {
  width: 100%;
  min-height: 100vh;
  background: radial-gradient(48.31% 108.99% at 100% 1.17%, #142527 0%, #15161c 100%);
  position: relative;
  padding: 30rpx;
  box-sizing: border-box;
  .content {
    margin-top: 20rpx;
    color: #dadada;
    font-size: 28rpx;
    word-break: break-all;
    line-height: 46rpx;
  }
}
</style>
